<template>

  <el-form class="filter-form-inline" label-position="right" label-width="82px" size="small">
    <el-row :gutter="40" style="margin-left: 0px; margin-right: 0px">
      <el-col :lg="8" :xs="4">
        <el-form-item label="统一社会信用代码：" label-width="140px">
          <span>{{ formData?.creditCode }}</span>
        </el-form-item>
      </el-col>
      <el-col :lg="8" :xs="4">
        <el-form-item label="联系人：">
          <span>{{ formData?.userName }}</span>
        </el-form-item>
      </el-col>
      <el-col :lg="8" :xs="4">
        <el-form-item label="联系电话：">
          <span>{{ formData?.tel }}</span>
        </el-form-item>
      </el-col>

      <el-col :lg="8" :xs="4" >
        <el-form-item label="创建人：" label-width="140px">
          <span>{{ formData?.creatorName }}</span>
        </el-form-item>
      </el-col>
      <el-col :lg="8" :xs="4">
        <el-form-item label="创建时间：">
          <span>{{ dateFormat("yyyy-mm-dd HH:MM:SS", formData?.createdAt) }}</span>
        </el-form-item>
      </el-col>

      <template v-if="boole">
        <el-col :lg="24" style="padding-left: 0;padding-right: 0">
          <item-title title="资质信息" />
        </el-col>
        <el-col :lg="24"  >
          <div v-if="formData?.files && formData?.files.length > 0" class="qualityFiles-container">
            <div v-for="(item,index) in formData?.files" :key="index" class="file-item">
              <image-upload-view ref="imageUploadView" :data="item" disabled="true" />
            </div>
          </div>
          <div v-else>
            <el-empty description="该商销客户未上传资质" />
          </div>
        </el-col>
      </template>

    </el-row>
  </el-form>

</template>

<script>
import { reactive, toRefs } from "vue";

export default {
  props: {
    boole: {
      type: Boolean,
      default: false,
    },
    formData: {
      type: Object,
      default: {},
    },
  },
  setup() {
    const data = reactive({
      count: 0,
    });

    return {
      ...toRefs(data),
    };
  },
};
</script>

<style lang="scss" scoped>
.qualityFiles-container {
  display: flex;
  flex-wrap: wrap;
}
</style>